//
//  HWXingyaogpngjuTool.m
//  HWanGame
//
//  Created by 陈道斌 on 2021/11/30.
//  Copyright © 2021 Chendaobin. All rights reserved.
//

#import "HWXingyaogpngjuTool.h"
#import "HWLoginController.h"
#import "XMGWebViewController.h"
#import "HWPaiHangBangViewController.h"
#import "HWGiftBagCenterzhongxingViewController.h"
#import "HWTYouXiKaiFuViewController.h"
#import "HWyaoqinghaoyoujiemianViewController.h"
#import "HWlingjuanzhongxingViewController.h"
#import "HWNewSignInViewController.h"
#import "HWTaskCenterViewController.h"
#import "HWIntegralMallshopViewController.h"
#import "HWTrumpetViewController.h"
#import "HWQuestionsViewController.h"
#import "HWTaskCenterViewController.h"
#import "HWxiaohaoSmallTransactionsViewController.h"
@implementation HWXingyaogpngjuTool


+  (void)shujuDic:(NSDictionary *)dic {
    
    
    if ([[HWLocallyStoredData getLoginUserID] isEqualToString:@""]) {
        
        
        HWLoginController  *login = [[HWLoginController alloc]init];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:login animated:YES];
        
        return;
        
    }
    
    
    NSString *urlStr =   [NSString stringWithFormat:@"%@",  dic[@"url"]];
    NSString *type =  [NSString stringWithFormat:@"%@",dic[@"type"]];
    if (![urlStr isEqualToString:@""]) {
        
        
        XMGWebViewController *webVc = [[XMGWebViewController alloc] init];
        webVc.url = [NSURL URLWithString:urlStr];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:webVc animated:YES];
        return;
    }
    
    
    
    
    if ([type integerValue] == 310) {
        
        HWPaiHangBangViewController  *PaiHang = [[HWPaiHangBangViewController alloc]init];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:PaiHang animated:YES];
        
        return;
        
        
    } else if ([type integerValue] == 311) {
        
        //        HWLiBaoCenterViewController  *liBao = [[HWLiBaoCenterViewController alloc]init];
        //             [self.navigationController pushViewController:liBao animated:YES];
        
        
        HWGiftBagCenterzhongxingViewController *libao = [[HWGiftBagCenterzhongxingViewController alloc]init];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:libao animated:YES];
        
        
        
        
        
        
        return;
        
    }else if ([type integerValue] == 312) {
        
        
        HWTYouXiKaiFuViewController *open = [[HWTYouXiKaiFuViewController alloc]init];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:open animated:YES];
        
        
        return;
        
    }else if ([type integerValue] == 313) {
        
        
        
        HWyaoqinghaoyoujiemianViewController *yaoqing = [[HWyaoqinghaoyoujiemianViewController alloc]init];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:yaoqing animated:YES];
        
        
        
        
        
        return;
        
    }else if ([type integerValue] == 314) {
        
        //    name = "领券中心";
        
        HWlingjuanzhongxingViewController *CollectStamps = [[HWlingjuanzhongxingViewController alloc]init];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:CollectStamps animated:YES];
        
        
        return;
        
    } else if([type intValue] == 321) {
        
        
        
        
        HWNewSignInViewController *newSign = [[HWNewSignInViewController alloc]init];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:newSign animated:YES];
        
        
        
        
        
    } else if ([type integerValue] == 314) {
        
        
        HWlingjuanzhongxingViewController *CollectStamps = [[HWlingjuanzhongxingViewController alloc]init];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:CollectStamps animated:YES];
        
        return;
        
        
    }else if ([type integerValue] == 328 ) {
        
        
        
        
        
        HWxiaohaoSmallTransactionsViewController *taskCenter = [[HWxiaohaoSmallTransactionsViewController  alloc]init];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:taskCenter animated:YES];
        
        return;
        
        
        
        
        
        
    }else if ([type integerValue] == 329 ) {
        
        
        
        HWIntegralMallshopViewController *integralMall = [[HWIntegralMallshopViewController  alloc]init];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:integralMall animated:YES];
        
        
        
        
    } else if ([type integerValue] == 331 ) {
        
        HWQuestionsViewController *question = [[HWQuestionsViewController alloc]init];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:question animated:NO];
        
        
    } else if ([type integerValue] == 332 ) {
        
        HWTrumpetViewController *trumpe = [[HWTrumpetViewController alloc]init];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:trumpe animated:YES];
        
        
    } else if ([type integerValue] == 330 ) {
        
        //        HWTaskCenterViewController *taskCenter = [[HWTaskCenterViewController  alloc]init];
        //        [[HWViewUtils getCurrentVC].navigationController pushViewController:taskCenter animated:YES];
        //
        HWNewSignInViewController *newSign = [[HWNewSignInViewController alloc]init];
        [[HWViewUtils getCurrentVC].navigationController  pushViewController:newSign animated:YES];
        
        
        
    }else if ([type integerValue] == 333 ) {
        
        
        
        HWTaskCenterViewController *taskCenter = [[HWTaskCenterViewController  alloc]init];
        [[HWViewUtils getCurrentVC].navigationController pushViewController:taskCenter animated:YES];
    }
    
    
    
}


@end
